package com.sh.data.engine.domain.common.model.domain;


import com.alibaba.fastjson.annotation.JSONField;

import java.util.Arrays;

public class Relationship {

    @JSONField(ordinal = 1)
    private String id;

    @JSONField(ordinal = 2)
    private String type;

    @JSONField(ordinal = 3)
    private String function;

    @JSONField(ordinal = 4)
    private String effectType;

    @JSONField(ordinal = 5)
    private String partition;

    @JSONField(ordinal = 6)
    private RelationshipElement target;

    @JSONField(ordinal = 7)
    private RelationshipElement[] sources;

    @JSONField(ordinal = 8)
    private RelationshipElement caller;

    @JSONField(ordinal = 9)
    private RelationshipElement[] callees;

    @JSONField(ordinal = 10)
    private String processId;

    @JSONField(ordinal = 11)
    private String timestampMin;

    @JSONField(ordinal = 12)
    private String timestampMax;

    @JSONField(ordinal = 13)
    private Integer distance;

    public void setId(String id) {
        this.id = id;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setFunction(String function) {
        this.function = function;
    }

    public void setEffectType(String effectType) {
        this.effectType = effectType;
    }

    public void setPartition(String partition) {
        this.partition = partition;
    }

    public void setTarget(RelationshipElement target) {
        this.target = target;
    }

    public void setSources(RelationshipElement[] sources) {
        this.sources = sources;
    }

    public void setCaller(RelationshipElement caller) {
        this.caller = caller;
    }

    public void setCallees(RelationshipElement[] callees) {
        this.callees = callees;
    }

    public void setProcessId(String processId) {
        this.processId = processId;
    }

    public void setTimestampMin(String timestampMin) {
        this.timestampMin = timestampMin;
    }

    public void setTimestampMax(String timestampMax) {
        this.timestampMax = timestampMax;
    }

    public void setDistance(Integer distance) {
        this.distance = distance;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof Relationship)) {
            return false;
        }
        Relationship other = (Relationship) o;
        if (!other.canEqual(this)) {
            return false;
        }
        Object this$id = getId(), other$id = other.getId();
        if ((this$id == null) ? (other$id != null) : !this$id.equals(other$id)) {
            return false;
        }
        Object this$type = getType(), other$type = other.getType();
        if ((this$type == null) ? (other$type != null) : !this$type.equals(other$type)) {
            return false;
        }
        Object this$function = getFunction(), other$function = other.getFunction();
        if ((this$function == null) ? (other$function != null)
            : !this$function.equals(other$function)) {
            return false;
        }
        Object this$effectType = getEffectType(), other$effectType = other.getEffectType();
        if ((this$effectType == null) ? (other$effectType != null)
            : !this$effectType.equals(other$effectType)) {
            return false;
        }
        Object this$partition = getPartition(), other$partition = other.getPartition();
        if ((this$partition == null) ? (other$partition != null)
            : !this$partition.equals(other$partition)) {
            return false;
        }
        Object this$target = getTarget(), other$target = other.getTarget();
        if ((this$target == null) ? (other$target != null) : !this$target.equals(other$target)) {
            return false;
        }
        if (!Arrays.deepEquals((Object[]) getSources(), (Object[]) other.getSources())) {
            return false;
        }
        Object this$caller = getCaller(), other$caller = other.getCaller();
        if ((this$caller == null) ? (other$caller != null) : !this$caller.equals(other$caller)) {
            return false;
        }
        if (!Arrays.deepEquals((Object[]) getCallees(), (Object[]) other.getCallees())) {
            return false;
        }
        Object this$processId = getProcessId(), other$processId = other.getProcessId();
        if ((this$processId == null) ? (other$processId != null)
            : !this$processId.equals(other$processId)) {
            return false;
        }
        Object this$timestampMin = getTimestampMin(), other$timestampMin = other.getTimestampMin();
        if ((this$timestampMin == null) ? (other$timestampMin != null)
            : !this$timestampMin.equals(other$timestampMin)) {
            return false;
        }
        Object this$timestampMax = getTimestampMax(), other$timestampMax = other.getTimestampMax();
        if ((this$timestampMax == null) ? (other$timestampMax != null)
            : !this$timestampMax.equals(other$timestampMax)) {
            return false;
        }
        Object this$distance = getDistance(), other$distance = other.getDistance();
        return !((this$distance == null) ? (other$distance != null)
            : !this$distance.equals(other$distance));
    }

    protected boolean canEqual(Object other) {
        return other instanceof Relationship;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $id = getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        Object $type = getType();
        result = result * 59 + (($type == null) ? 43 : $type.hashCode());
        Object $function = getFunction();
        result = result * 59 + (($function == null) ? 43 : $function.hashCode());
        Object $effectType = getEffectType();
        result = result * 59 + (($effectType == null) ? 43 : $effectType.hashCode());
        Object $partition = getPartition();
        result = result * 59 + (($partition == null) ? 43 : $partition.hashCode());
        Object $target = getTarget();
        result = result * 59 + (($target == null) ? 43 : $target.hashCode());
        result = result * 59 + Arrays.deepHashCode((Object[]) getSources());
        Object $caller = getCaller();
        result = result * 59 + (($caller == null) ? 43 : $caller.hashCode());
        result = result * 59 + Arrays.deepHashCode((Object[]) getCallees());
        Object $processId = getProcessId();
        result = result * 59 + (($processId == null) ? 43 : $processId.hashCode());
        Object $timestampMin = getTimestampMin();
        result = result * 59 + (($timestampMin == null) ? 43 : $timestampMin.hashCode());
        Object $timestampMax = getTimestampMax();
        result = result * 59 + (($timestampMax == null) ? 43 : $timestampMax.hashCode());
        Object $distance = getDistance();
        return result * 59 + (($distance == null) ? 43 : $distance.hashCode());
    }

    public String toString() {
        return "Relationship(id=" + getId() + ", type=" + getType() + ", function=" + getFunction()
            + ", effectType=" + getEffectType() + ", partition=" + getPartition() + ", target="
            + getTarget() + ", sources=" + Arrays.deepToString((Object[]) getSources()) + ", caller="
            + getCaller() + ", callees=" + Arrays.deepToString((Object[]) getCallees()) + ", processId="
            + getProcessId() + ", timestampMin=" + getTimestampMin() + ", timestampMax="
            + getTimestampMax() + ", distance=" + getDistance() + ")";
    }

    public String getId() {
        return this.id;
    }

    public String getType() {
        return this.type;
    }

    public String getFunction() {
        return this.function;
    }

    public String getEffectType() {
        return this.effectType;
    }

    public String getPartition() {
        return this.partition;
    }

    public RelationshipElement getTarget() {
        return this.target;
    }

    public RelationshipElement[] getSources() {
        return this.sources;
    }

    public RelationshipElement getCaller() {
        return this.caller;
    }

    public RelationshipElement[] getCallees() {
        return this.callees;
    }

    public String getProcessId() {
        return this.processId;
    }

    public String getTimestampMin() {
        return this.timestampMin;
    }

    public String getTimestampMax() {
        return this.timestampMax;
    }

    public Integer getDistance() {
        return this.distance;
    }
}